package com.lx.base;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lx.base.api.dto.BaseDto;
import com.lx.base.api.param.PageBaseParam;

import java.util.List;

public interface BaseService<T,DTO,ADD,UPDATE,PAGEPARAM extends PageBaseParam>  extends IService<T> {

    /**
     * 根据id查询
     * @param id
     * @return
     */
    BaseDto<DTO> findById(java.io.Serializable id);



    BaseDto<DTO>  add(ADD add) throws Exception;

    BaseDto<DTO> updateByParam(UPDATE updateParam) throws Exception;

    BaseDto<List<DTO>> pagelist(PAGEPARAM pageparam) throws Exception;

   List<T> pagelist2T(PAGEPARAM pageparam) throws Exception;

    DTO t2DTO(T t);
}
